import { CommonField } from '@/pages/OrderModule/common/components/CommonForm';
import SubTitle from '@/pages/OrderModule/common/components/SubTitle';
import Typography from '@/pages/OrderModule/common/components/Typography';
import { Form, Radio } from 'antd';
import Style from './index.module.less';

/**
 * 筛选方式 单选框
 * @param {object} props
 * @param {object} props.wrapStyle 外层样式
 */
function FilterType(props) {
  const { wrapStyle = {}, ...args } = props || {};
  return (
    <div style={wrapStyle}>
      <SubTitle symbol as="s2" title="筛选方式" wrapStyle={{ marginBottom: 16 }} />
      <Form.Item name={'isLabelOr'} style={{ marginBottom: 0 }}>
        <CommonField
          Component={Radio.Group}
          props={{
            className: Style['filter-type-radio-group'],
            options: [
              {
                label: (
                  <>
                    <Typography>包含任意一个标签</Typography>
                    <Typography type="info">（多个标签用逗号隔开）</Typography>
                  </>
                ),
                value: true,
              },
              {
                label: (
                  <>
                    <Typography>同时包含指定标签</Typography>
                    <Typography type="info">（多个标签之间用&连接）</Typography>
                  </>
                ),
                value: false,
              },
            ],
          }}
        />
      </Form.Item>
    </div>
  );
}
export default FilterType;
